package com.example.sxmall.dao.mapper;

import com.example.sxmall.dao.pojo.Permission;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface PermissionMapper {
    /**
     * 查看权限列表
     * @return
     */
    public List<Permission> listPermission();

    /**
     * 根据ID查询
     * @param perid
     * @return
     */
    public Permission findPermissionByID(@Param("perid") Integer perid);

    /**
     * 根据权限名称的模糊查询
     * @param pername
     * @return
     */
    public List<Permission> findPermissionByCompany(@Param("pername") String pername);

    /**
     * 添加
     * @param permission
     * @return
     */
    public int insertPermission(@Param("permission") Permission permission);

    /**
     * 删除
     * @param perid
     * @return
     */
    public int deletePermission(@Param("perid") int perid);

    /**
     * 动态修改
     * @param permission
     * @return
     */
    public int updatePermission(@Param("permission") Permission permission);
}
